package com.heima.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.mapper.ChannelMapper;
import com.heima.pojo.dto.ChannelConfigDTO;
import com.heima.pojo.entity.Channel;
import com.heima.pojo.vo.ChannelVO;
import com.heima.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hutool.core.collection.CollectionUtil;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * \* User: chy
 * \* Date: 2025/8/24  20:25
 * \* Description:
 * \
 */
@Service
public class ChannelServiceImpl extends ServiceImpl<ChannelMapper, Channel> implements ChannelService {

    @Autowired
    private ChannelMapper channelMapper;
    /**
     * 获取渠道列表
     * @param innerCode
     * @return
     */
    @Override
    public List<ChannelVO> channelList(String innerCode) {

        List<ChannelVO> channelList =  channelMapper.channelList(innerCode);
        return channelList;

    }
    /**
     * 售货机货道配置
     *
     * @param channelConfigDTO
     * @return
     */
    @Override
    @Transactional
    public void channelConfig(ChannelConfigDTO channelConfigDTO) {

        //TODO 未完成
    }
}
